﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true" CodeFile="NhanVien.aspx.cs" Inherits="Admin_NhanVien" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%=txtNgaySinh.ClientID%>").datepicker({ dateFormat: "dd/mm/yy", maxDate: "+0D" });
            activeMenu(5, 0);
        });
    </script>
    <div class="divsize">
        <fieldset>
            <legend>Thêm nhân viên</legend>
            <ol class="form form-clear">
                <asp:Label ID="messageID" runat="server" Enabled="false"></asp:Label>
                <asp:HiddenField ID="GioiTinh" runat="server"></asp:HiddenField>
                <li>
                    <label>Mã nhân viên</label>
                    <asp:TextBox ID="txtMNV" runat="server"></asp:TextBox>
                </li>
                <li>
                    <label>Tên nhân viên</label>
                    <asp:TextBox ID="txtTNV" runat="server"></asp:TextBox>
                </li>
                <li>
                    <label>Địa chỉ</label>
                    <asp:TextBox ID="txtDiaChi" runat="server"></asp:TextBox>
                </li>
                <li>
                    <label>Ngày sinh</label>
                    <asp:TextBox ID="txtNgaySinh" runat="server"></asp:TextBox>
                </li>
                <li>
                    <label>Giới tính</label>
                    <asp:RadioButton ID="rbNam" runat="server" TextAlign="Right" Text="Nam" GroupName="GT"
                        AutoPostBack="true" OnCheckedChanged="RadioButton_CheckedChanged" />
                    <asp:RadioButton ID="rbNu" runat="server" TextAlign="Right" Text="Nữ" GroupName="GT"
                        AutoPostBack="true" OnCheckedChanged="RadioButton_CheckedChanged" />
                </li>
              <%-- <li>
                    <label>Chức vụ</label>
                    <asp:TextBox ID="txtChucVu" runat="server"></asp:TextBox>
                </li>--%>
                <li>
                    <asp:Button ID="btnThem" runat="server" CssClass="btn primary" Text="Thêm thông tin" OnClick="btnThem_Click1" />
                    <asp:Button ID="btnSua" runat="server" CssClass="btn primary" Enabled="false" Text="Sửa thông tin" OnClick="btnSua_Click1" />                    
                </li>
            </ol>
        </fieldset>
    </div>
    <div>
        <fieldset>
            <legend>Danh sách</legend>
            <asp:ListView ID="ListViewNhanVien" runat="server" OnItemCommand="ListViewNhanVien_OnItemCommand"
                OnItemDeleting="ListViewNhanVien_OnItemDeleting" OnItemUpdating="ListViewNhanVien_OnItemUpdating">
                <LayoutTemplate>
                    <table border="1">
                        <tr>
                            <th>Mã nhân viên</th>
                            <th>Tên nhân viên</th>
                            <th>Địa chỉ</th>
                            <th>Ngày sinh</th>
                            <th>Giới tính</th>
                          <%--  <th>Chức vụ</th>--%>
                        </tr>
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%# Eval("MaNV") %></td>
                        <td><%# Eval("TenNV") %></td>
                        <td><%# Eval("DiaChi") %></td>
                        <td><%# Eval("NgaySinh") %></td>
                        <td><%# Eval("GioiTinh") %></td>
                       <%-- <td><%# Eval("ChucVu") %></td>--%>
                        <td >                            
                            <asp:LinkButton ID="LinkButton1" ToolTip="Xóa một bản ghi" runat="server" CommandArgument='<%# Eval("MaNV") %>'
                                CommandName="Delete" ForeColor="Brown" OnClientClick="return confirm('Bạn chắc chắn muốn xóa ?')">Xóa</asp:LinkButton>
                            |
                            <asp:LinkButton ID="LinkButtonSua" ToolTip="Sửa thông tin" runat="server" CommandArgument='<%# Eval("MaNV") %>'
                                CommandName="Update">Sửa</asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
        </fieldset>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <ul class="m-melanin-vertical-navigation">
        <%--<li>
            <span class=" ss_sprite ss_user">&nbsp;</span>
            <a href="DanhSachNguoiDung.aspx" title="Click here to access security Control Panel" class="" id="User">
                <span>Danh sách người dùng</span>
            </a>
        </li>--%>
        <li>
            <span class=" ss_sprite ss_user">&nbsp;</span>
            <a href="NhanVien.aspx" title="Click here to access security Control Panel" class="" id="employee">
                <span>Danh sách nhân viên</span>
            </a>
        </li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" runat="Server">
    <asp:Button ID="button_create_employee" runat="server" CssClass="btn small primary" Text="Thêm nhân viên" />
</asp:Content>
